import request from '@/utils/request/request';
import requestForFile from '@/utils/request/requestForFile';
// 分页查询供应商到货API数据
export function getPmsDcdItemPage(params: any) {
  return request.get('/api/procurement/order/dcd-item/page', {
    params,
  });
}
// 新增机载产品单件代码到货API
export function savePmsReceiveDetail(data: any) {
  return request.post(
    '/api/procurement/order/receive-detail-batch/saveAll',
    data
  );
}
// 新增机载产品单件代码到货API
export function getPmsReceiveDetail(id: any) {
  return request.get(
    `/api/procurement/order/receive-detail-batch/getReceiveDetailBatchAll/${id}`
  );
}
// 获取批次表列表
export function getPmsReceiveBatchPage(params: any) {
  return request.get('/api/procurement/order/receive-detail-batch/page', {
    params,
  });
}
// 删除批次表
export function deletePmsReceiveBatch(id: string) {
  return request.delete(
    `/api/procurement/order/receive-detail-batch/deleteAll/${id}`
  );
}
// 编辑批次表
export function updatePmsReceiveDetail(data: any) {
  return request.post(
    '/api/procurement/order/receive-detail-batch/updateAll',
    data
  );
}
// 导出
export function exportPmsReceiveDetail(params: any) {
  return requestForFile.get('/api/procurement/order/receive-detail/export', {
    params,
    responseType: 'blob',
  });
}

// 校验
export function checkPmsReceiveLDetailBatch(data: any) {
  return request.post(
    '/api/procurement/order/receive-detail-batch/checkPmsReceiveLDetailBatch',
    data
  );
}
